package org.zjx.action.basic;

import org.zjx.action.Action;
import org.zjx.core.IWindow;
import org.zjx.operation.WindowOperation;

public class HotkeyAction extends Action {
    private final int[] keyCode;

    public HotkeyAction(IWindow targetWindow, int... keyCode) {
        super(targetWindow, true);
        this.keyCode = keyCode;
    }

    @Override
    protected void doExecute() throws Exception {
        targetWindow.execute(WindowOperation.hotkey(keyCode));
    }
}
